var app = getApp()
Page({
  data: {
    searchkeyword: '',
    winWidth: 0,
    winHeight: 0,
    author: 'Lotus'
  },
  gotosearch: function () {
    var that = this;
    var searchkeyword = that.data.searchkeyword;
    wx.redirectTo({
      url: 'productlist?searchkeyword=' + searchkeyword
    })
    app.util.request({
      'url': 'entry/wxapp/Searchlist',
      'cachetime': '30',
      success: function (res) {
        console.log('11111111111111');
        that.setData({
          swipers: swipers,
        })
      }
    })



  },
  changekeyword: function (e) {
    this.setData({ searchkeyword: e.detail.value });
  },
  onLoad: function (options) {
    var that = this;
    if (options.fromInviteCode) {
      app.globalData.fromInviteCode=options.fromInviteCode;
    }
    app.appstart();

    wx.getSystemInfo({
      success: function (res) {
        that.setData({
          winWidth: res.windowWidth,
          winHeight: res.windowHeight
        });
      }

    });
  }
})